﻿/*
Copyright (c) 2003-2012, CKSource - Frederico Knabben. All rights reserved.
For licensing, see LICENSE.html or http://ckeditor.com/license
*/

CKEDITOR.editorConfig = function( config )
{
	// Define changes to default configuration here. For example:
	config.skin 						= "kama";
	//config.language 					= "vi";
	config.scayt_autoStartup 			= false;
	config.removePlugins 				= "scayt";
	config.disableNativeSpellChecker 	= true;
	config.entities 					= false;
	config.resize_dir 					= "vertical";
	//config.toolbar 						= "Full";
	config.toolbar 						= "Custom";
	config.width 						= 750;
	config.height 						= 650;
	/* Toolbar for backEnd */
	config.toolbar_All = [
    	["Source", "-", "Save", "NewPage", "DocProps", "Preview", "Print", "-", "Templates", "-", "Cut", "Copy", "Paste", "PasteText", "PasteFromWord", "-", "Undo", "Redo", "-", "Find", "Replace", "-", "SelectAll", /* "SpellChecker", "Scayt",  */ "-", "Form", "Checkbox", "Radio", "TextField", "Textarea", "Select", "Button", "ImageButton", "HiddenField"], 
	  	"/", 
	  	["Bold", "Italic", "Underline", "Strike", "Subscript", "Superscript", "-", "NumberedList", "BulletedList", "-", "Outdent", "Indent", "-", "Blockquote", "CreateDiv", "-", "JustifyLeft", "JustifyCenter", "JustifyRight", "JustifyBlock", "-", "BidiLtr", "BidiRtl", "TextColor", "BGColor", "RemoveFormat", "-", "Maximize", "ShowBlocks" /*, "-", "About"*/],
	  	["Styles", "Format", "Font", "FontSize"],
	  	["Link", "Unlink", "Anchor", "Image", "Flash", "Table", "HorizontalRule", "Smiley", "SpecialChar", "PageBreak", "Iframe"]
    ];
	
    config.toolbar_Full = [	
     	["Source", "Preview", "-", "Undo", "Redo", "Find", "Replace", "RemoveFormat", "Bold", "Italic", "Underline", 
     	 "Strike", "Subscript", "Superscript", "NumberedList", "BulletedList", "-", "Outdent", "Indent", "-", 
     	 "CreateDiv", "-", "JustifyLeft", "JustifyCenter", "JustifyRight", "JustifyBlock", "TextColor", "BGColor"],
     	"/",
    	["Styles", "Format", "Font", "FontSize", "Link", "Unlink", "Image", "Flash", 
    	 "Table", "HorizontalRule", "Smiley", "SpecialChar", "PageBreak", "Maximize"], 
    ];
        
    config.toolbar_Basic = [
        ["Source", "Preview", "-","Bold","Italic","Underline","Strike","Subscript","Superscript","JustifyLeft","JustifyCenter","JustifyRight","JustifyBlock","NumberedList","BulletedList","TextColor","BGColor","Link","Unlink"]
    ];
    	
    config.toolbar_Simple = [
        ["Preview", "Bold","Italic","Underline","Strike","Subscript","Superscript","JustifyLeft","JustifyCenter","JustifyRight","JustifyBlock","NumberedList","BulletedList","TextColor","BGColor"]
    ];
    
	config.toolbar_Custom = [	
     	["Preview", "-", "Undo", "Redo", "Find", "Replace", "RemoveFormat", "Bold", "Italic", "Underline", 
     	 "Strike", "Subscript", "Superscript", "NumberedList", "BulletedList", "-", "Outdent", "Indent", "-", 
     	 "CreateDiv", "-", "JustifyLeft", "JustifyCenter", "JustifyRight", "JustifyBlock", "TextColor", "BGColor"],
     	"/",
    	["Styles", "Format", "Font", "FontSize", "Link", "Unlink", "Image", "Flash", 
    	 "Table", "HorizontalRule", "Smiley", "SpecialChar", "PageBreak"], 
    ];
	
   	//CKFINDER INCLUDE
    if (!(CKEDITOR.ckfinderIntegration === false)){
    	config.filebrowserBrowseUrl 		= "/public/skins/admin/js/ckfinder/ckfinder.html";
    	config.filebrowserImageBrowseUrl 	= "/public/skins/admin/js/ckfinder/ckfinder.html?type=Images";
    	config.filebrowserFlashBrowseUrl 	= "/public/skins/admin/js/ckfinder/ckfinder.html?type=Flash";
    	config.filebrowserUploadUrl 		= "/public/skins/admin/js/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Files";
    	config.filebrowserImageUploadUrl 	= "/public/skins/admin/js/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Images";
    	config.filebrowserFlashUploadUrl 	= "/public/skins/admin/js/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Flash";	
    }
};
